/**
 * 基本配置
 * @param {*} data
 * @param {*} options
 * @return {Promise<*>}
 */
export function basicConfig(data = {}, options = {}) {
	return wx.$http.get('index/config', Object.assign(data, {
		store_id: wx.$getStoreId(),
		sale_id: wx.$getSaleId(),
	}), options).then(function (res) {
		return res.data;
	});
}

/**
 * 系统基本配置
 * @param {*} data
 * @param {*} options
 * @return {Promise<*>}
 */
export function sysConfig(data = {}, options = {}) {
	return wx.$http.get('index/sysconfig', data, options).then(function (res) {
		return res.data;
	});
}
export function homeDetail(data = {}, options = {}) {
	return wx.$http.get('home/detail', data, options).then(function (res) {
		return res.data;
	});
}
/**
 * 首页简介、介绍内容
 * @param {*} data
 * @param {*} options
 * @return {Promise<*>}
 */
export function getHomeContent(data = {}, options = {}) {
	return wx.$http.get('home/lists', data, options).then(function (res) {
		return res.data;
	});
}
/**
 * Banner
 * @param {*} data
 * @param {*} options
 * @return {Promise<*>}
 */
export function bannerList(data = {}, options = {}) {
	return wx.$http.get('index/banners', data, options).then(function (res) {
		return res.data;
	});
}


/**
 * 首页文章列表
 * @param {*} data
 * @param {*} options
 * @return {Promise<*>}
 */
export function posts(data = {}, options = {}) {
	return wx.$http.get('post/lists', data, options).then(function (res) {
		return res.data;
	});
}


/**
 * 文章详情
 * @param {*} data
 * @param {*} options
 * @return {Promise<*>}
 */
export function postDetail(data = {}, options = {}) {
	return wx.$http.get('post/detail', data, options).then(function (res) {
		return res.data;
	});
}

/**
 * 分类列表
 * @param {*} data
 * @param {*} options
 * @return {Promise<*>}
 */
export function categories(data = {}, options = {}) {
	return wx.$http.get('category/lists', data, options).then(function (res) {
		return res.data;
	});
}

/**
 * 医生列表
 * @param {*} data
 * @param {*} options
 * @return {Promise<*>}
 */
export function doctorList(data = {}, options = {}) {
	return wx.$http.get('index/doctorlists', data, options).then(function (res) {
		return res.data;
	});
}